package org.jeecg.modules.api;

import com.dingtalk.api.request.OapiProcessinstanceCreateRequest;
import com.taobao.api.ApiRuleException;
import com.taobao.api.internal.util.RequestCheckUtils;

/**
 * @author ZhangHaoyu
 * @description
 * @date 2020/5/29 17:49
 */
public class OverrideCheck extends OapiProcessinstanceCreateRequest{

    @Override
    public void check() throws ApiRuleException {
        RequestCheckUtils.checkMaxListSize(super.getApprovers(), 32, "approvers");
        RequestCheckUtils.checkMaxListSize(this.getCcList(), 32, "ccList");
        RequestCheckUtils.checkNotEmpty(this.getDeptId(), "deptId");
        RequestCheckUtils.checkObjectMaxListSize(this.getFormComponentValues(), 32, "formComponentValues");
        RequestCheckUtils.checkNotEmpty(this.getOriginatorUserId(), "originatorUserId");
        RequestCheckUtils.checkNotEmpty(this.getProcessCode(), "processCode");
    }

}
